<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            margin: 0 auto;
            width: 400px;
            height: 400px;
            background-color: pink;
            /* 动画名 动画时间 匀速 无限循环 */
            animation: name 2.5s linear infinite;
            box-shadow: 0 0 20px rgba(0, 0, 0, .5);
            border-radius: 25%;
        }

        .box:hover {
            /* 暂停动画 */
            animation-play-state: paused;
        }

        @keyframes name {
            0% {
                background-color: aqua;
                opacity: 1;
                border-radius: 25%;
            }

            50% {
                background-color: blue;
                opacity: 0.7;
                border-radius: 50%;
            }

            100% {
                background-color: aqua;
                opacity: 1;
                border-radius: 25%;
            }
        }
    </style>
</head>

<body>
    <div class="box"></div>
</body>

</html>